-module(integer_finder).
-export([find_integers/2]).

find_integers(PidList, FilterFun) ->
  Jobs = lists:map(
          fun(Pid) -> {Pid, {filter, self(), FilterFun}} end,
          PidList),
  lists:sort(mapreduce:mapreduce(Jobs, fun lists:append/2, [])).